package osx.mantianx;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import osx.mantianx.config.MyConfiguration;
import osx.mantianx.dao.UserMapper;

/**
 * @author starrysky
 * @title: MyBatsMain
 * @projectName spring5_Transaction
 * @description: TODO
 * @date 2021/2/323:06
 */
public class MyBatsMain {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(MyConfiguration.class);
        UserMapper userMapper = (UserMapper) context.getBean("userMapper");
        userMapper.selectUser().stream().forEach(System.out::println);
    }
}
